package com.ruoyi.scale.document.refs;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;

@Getter
@Setter
public class ScaleDomainRule implements Serializable {
    /**
     * 最小值
     */
    private BigDecimal min;
    /**
     * 最大值
     */
    private BigDecimal max;

    /**
     * 结论
     */
    private String conclusion;
    /**
     * 简单建议
     */
    private String advice;
    /**
     * 详细建议
     */
    private String detailAdvice;

    /**
     * 分值是否匹配
     *
     * @param score
     * @return
     */
    public boolean match(BigDecimal score) {
        return this.min.compareTo(score) <= 0 && score.compareTo(this.max) <= 0;
    }
}
